//
//  changePasswordController.m
//  soccer
//
//  Created by 上官千城 on 15/9/5.
//  Copyright (c) 2015年 上官千城. All rights reserved.
//

#import "changePasswordController.h"

@interface changePasswordController ()

@end

@implementation changePasswordController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    if (self.type == 1) {
        self.navigationItem.title = @"绑定手机";
        [self creatType1];
    }
    if (self.type == 2) {
        self.navigationItem.title = @"绑定邮箱";
        [self creatType2];
    }
    if (self.type == 3) {
        [self creatType3];
    }
    if (self.type == 4) {
        self.navigationItem.title = @"修改密码";

        [self creatType4];
    }
    
    
}
//绑定手机
-(void)creatType1
{
    
}

-(void)creatType2
{
    
}

-(void)creatType3
{
    
}

//修改密码
-(void)creatType4
{
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(10, 80, 80, 30)];
    label.text = @"原 密 码 : ";
    [self.view addSubview:label];
    
    UITextField *oldPassword = [[UITextField alloc]initWithFrame:CGRectMake(label.frame.origin.x+label.frame.size.width+20, label.frame.origin.y, WIDTH - label.frame.size.width - 40, 30)];
    oldPassword.borderStyle = UITextBorderStyleRoundedRect;
//    oldPassword.backgroundColor = [UIColor grayColor];
    [self.view addSubview:oldPassword];
    
    UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(10, label.frame.origin.y + label.frame.size.height+10, 80, 30)];
    label1.text = @"新 密 码 : ";
    [self.view addSubview:label1];
    
    UITextField *newPassword = [[UITextField alloc]initWithFrame:CGRectMake(label1.frame.origin.x + label1.frame.size.width + 20, label1.frame.origin.y, WIDTH - label1.frame.size.width - 40, 30)];
    newPassword.borderStyle = UITextBorderStyleRoundedRect;
//    newPassword.backgroundColor = [UIColor blueColor];
    [self.view addSubview:newPassword];
    
    UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(label1.frame.origin.x, label1.frame.origin.y + label1.frame.size.height+10, 90, 30)];
    label2.text = @"在输入一次:";
    [self.view addSubview:label2];
    
    UITextField *repeat = [[UITextField alloc]initWithFrame:CGRectMake(label2.frame.origin.x + label2.frame.size.width+10, label2.frame.origin.y, WIDTH - label2.frame.size.width - 30, 30)];
    repeat.borderStyle = UITextBorderStyleRoundedRect;
//    repeat.backgroundColor = [UIColor greenColor];
    [self.view addSubview:repeat];
    
    
    UIButton *sure = [UIButton buttonWithType:UIButtonTypeCustom];
    sure.frame = CGRectMake(10, repeat.frame.origin.y + repeat.frame.size.height + 30, WIDTH - 20, 30);
    [sure setTitle:@"确认修改" forState:UIControlStateNormal];
    sure.backgroundColor = [UIColor greenColor];
    [sure addTarget:self action:@selector(sureButton) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:sure];
    
}


-(void)sureButton
{
    NSLog(@"修改密码");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
